package cn.stylefeng.guns.modular.fsjs.controller;

import static cn.stylefeng.roses.core.util.HttpContext.getIp;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.stylefeng.guns.core.common.exception.InvalidKaptchaException;
import cn.stylefeng.guns.core.common.node.MenuNode;
import cn.stylefeng.guns.core.log.LogManager;
import cn.stylefeng.guns.core.log.factory.LogTaskFactory;
import cn.stylefeng.guns.core.shiro.ShiroKit;
import cn.stylefeng.guns.core.shiro.ShiroUser;
import cn.stylefeng.guns.core.util.ApiMenuFilter;
import cn.stylefeng.guns.core.util.KaptchaUtil;
import cn.stylefeng.guns.modular.fsjs.service.IAccountService;
import cn.stylefeng.guns.modular.system.model.Account;
import cn.stylefeng.guns.modular.system.model.BackMsg;
import cn.stylefeng.guns.modular.system.model.Register;
import cn.stylefeng.guns.modular.system.model.User;
import cn.stylefeng.roses.core.util.ToolUtil;

import com.google.code.kaptcha.Constants;

@Controller
@RequestMapping("/proce")
public class PermisonController {
	@Autowired
	private IAccountService accountService;
	
	@PostMapping(value = "/register")
	@ResponseBody
	public Object register(Register register,HttpServletRequest request, HttpServletResponse response){
		return  accountService.register(register);
	}
	@PostMapping(value = "/getbackpw")
	@ResponseBody
	public Object getbackpw(BackMsg backMsg,HttpServletRequest request, HttpServletResponse response){
		
		return accountService.getBackPW(backMsg);
	}
	
	
}
